# file time string mark
import time

from mttools import print_custom_vars

time_str = time.strftime("%Y-%m-%d_%H-%M-%S", time.localtime())

##########################################################################
python3_bin_path = '/usr/bin/python3'
systemctl_service_name = 'maintain_task_runner.service'
systemctl_service_description = 'maintain task runner,file clean and backup'
systemctl_timer_name = 'maintain_task_runner.timer'
systemctl_timer_expression = '*-*-* 03:00:00'
systemctl_service_linux_user = 'root'

backup_file_conf_list = [
    # [('172.16.2.244', 22, 'root'),
    #  ('/opt/workspace/python/ci-script/mttools.py',
    #   '/opt/backup/web_data-{}.tar.gz'.format(time_str),
    #   '/opt/backup/web_data-{}.tar.gz'.format(time_str)
    #   )]
]
backup_pg_conf_list = [
    # [('192.168.2.202', 22, 'root'),
    #  ('/opt/backup/pg_backup-{}.sql'.format(time_str),
    #   '/opt/backup/pg_backup_data-{}.tar.gz'.format(time_str),
    #   '/opt/backup/pg_backup_data-{}.tar.gz'.format(time_str)
    #   ),
    #  ('pg_ip', 'pg_port', 'pg_user', 'pg_db', 'pg_psw')
    #  ]
]
backup_mysql_conf_list = [
    # [('192.168.2.202', 22, 'root'),
    #  ('/opt/backup/mysql_backup-{}.sql'.format(time_str),
    #   '/opt/backup/mysql_backup_data-{}.tar.gz'.format(time_str),
    #   '/opt/backup/mysql_backup_data-{}.tar.gz'.format(time_str)
    #   ),
    #  ('mysql_ip', 'mysql_port', 'mysql_user', 'mysql_db', 'mysql_psw')
    #  ]
]
# dump path is folder
backup_mongo_conf_list = [
    # [('192.168.2.202', 22, 'root'),
    #  ('/opt/backup/mongo_backup-{}'.format(time_str),
    #   '/opt/backup/mongo_backup_data-{}.tar.gz'.format(time_str),
    #   '/opt/backup/mongo_backup_data-{}.tar.gz'.format(time_str)
    #   ),
    #  ('mongo_ip', 'mongo_port', 'mongo_user', 'mongo_db', 'mongo_psw')
    #  ]
]

# ('/opt/workspace/python/ci-script/test', '*.txt', 5)
# path,wildcard,file to keep not remove
clean_config_list = [
    # ('/opt/workspace/python/ci-script/test', '*.txt', 1),
    # ('/opt/workspace/python/ci-script/test', '*.log', 2),
    # ('/opt/workspace/python/ci-script/test', '*.tar.gz', 1),
]
# confirm path to prevent delete error file
clean_white_list_conf = [
    # '/opt/workspace/python/ci-script/test'
]

# when use public mailbox, ssl should be true
# if you use private mailbox，ssl maybe false,depend on your mail server setting
# receivers can be xxx@mailcom or ['xxx@mailcom','xxx@mailcom']
mail_notification_enable = False
mail_host = ''
mail_user = ''
mail_user_psw = ''
mail_receivers = ''
mail_ssl_enable = False
mail_title = ''

print_custom_vars(vars())
